<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html ;charset=utf-8">
    <meta name="google" content="notranslate" />
    <meta http-equiv="X-UA-COMPATIBLE" content="IE=edge"/>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0"/>
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>客户查询</title>
    <link rel="stylesheet" href="{{URL::asset('/ucenter/css/base.css')}}">
    <link rel="stylesheet" href="{{URL::asset('/admin/css/customercx.css')}}">
</head>
<body>
@include('admin.adminheader')
@include('admin.adminleft')
<div class="L_customerCX">
    <div class="L_cxCON">
        <div class="L_ZL">
            <div class="L_search">
                <span>客户昵称</span>
                <input id="searchname" type="text" value="{{$username}}" placeholder="请输入分析师名称">
                <span class="cxBtn">查询</span>
            </div>
            @if($userinfo)
            <div class="L_info">
                <ul>
                    <li class="L_photo">
                        <img src="{{$userinfo->photo}}" alt="">
                    </li>
                    <li class="L_name">
                        <p>
                            <span class="L_80color">网站昵称</span>
                            <span class="L_28color">{{$userinfo->username}}</span>
                        </p>
                        <p>
                            <span class="L_80color">认证状态</span>
                            <span class="L_28color">
                                @if($userinfo->isanalyst == 1)
                                    认证
                                    <i><img src="{{ URL::asset('admin/images/sfrz.png') }}" alt=""></i>
                                @else
                                    未认证
                                @endif
                            </span>
                        </p>
                        <p>
                            <span class="L_80color">当前段位</span>
                            <span class="L_28color">
                                @if($userinfo->grade == '4') 金融宗师
                                @elseif($userinfo->grade == '3') 操盘大师
                                @elseif($userinfo->grade == '2') 分析专家
                                @elseif($userinfo->grade == '1') 交易高手
                                @else 交易能手
                                @endif
                            </span>
                        </p>
                    </li>
                    <li class="L_line"></li>
                    <li class="L_time">
                        <p>
                            <span class="L_80color">注册时间</span>
                            <span class="L_28color">{{date('Y-m-d H:i:s',$userinfo->reg_time)}}</span>
                        </p>
                        <p>
                            <span class="L_80color">联系电话</span>
                            <span class="L_28color">{{$userinfo->tel}}</span>
                        </p>
                        <p>
                            <span class="L_80color">所在地址</span>
                            <span class="L_28color">{{$userinfo->province}} {{$userinfo->city}} {{$userinfo->country}} </span>
                        </p>
                    </li>
                </ul>
            </div>
            <div class="L_idinfo">
                <ul>
                    <li class="L_photo">
                        @if($userinfo->idcardimg)<img src="{{$userinfo->idcardimg}}" alt="">@endif
                    </li>
                    <li class="L_photo L_photo2">
                        @if($userinfo->idcardimgf)<img src="{{$userinfo->idcardimgf}}" alt="">@endif
                    </li>
                    <li>
                        <h3>身份信息</h3>
                        <p class="L_line"></p>
                        <p>
                            <span class="L_80color">真实姓名</span>
                            <span class="L_28color">{{$userinfo->realname}}</span>
                        </p>
                        <p>
                            <span class="L_80color">身份证号</span>
                            <span class="L_28color">{{$userinfo->idcard}}</span>
                        </p>
                        <p>
                            <span class="L_80color">最高学历</span>
                            <span class="L_28color">{{$userinfo->diplomas}}</span>
                        </p>
                        <p>
                            <span class="L_80color">毕业院校</span>
                            <span class="L_28color">{{$userinfo->school}}</span>
                        </p>
                        <p>
                            <span class="L_80color">上传时间</span>
                            <span class="L_28color">{{date('Y-m-d',$userinfo->card_auth_time)}}</span>
                        </p>
                    </li>
                </ul>
            </div>
            @else
                @if($username)
                 <div class="L_info" style="text-align: center;line-height: 160px;">没有符合查询条件的用户</div>
                @endif
            @endif
            @if($bankarr)
            <div class="L_txinfo">
                <ul>
                    @foreach($bankarr as $k=>$v)
                    <li>
                        <h3>提现信息1</h3>
                        <p class="L_line"></p>
                        <p>
                            <span class="L_80color">银<span style="display: inline-block;width: 30px;"></span>行</span>
                            <span class="L_28color">{{$v->bank}}</span>
                        </p>
                        <p>
                            <span class="L_80color">开&nbsp;&nbsp;户&nbsp;&nbsp;行</span>
                            <span class="L_28color">{{$v->bank_branch}}</span>
                        </p>
                        <p>
                            <span class="L_80color">银行卡号</span>
                            <span class="L_28color">{{$v->bank_number}}</span>
                        </p>
                        <p>
                            <span class="L_80color">上传时间</span>
                            <span class="L_28color">{{date('Y-m-d',$v->bank_auth_time)}}</span>
                        </p>
                    </li>
                    @if($k < count($bankarr)-1)
                    <li class="L_line"></li>
                    @endif
                    @endforeach
                </ul>
            </div>
            @endif
        </div>
    </div>
</div>
</body>
</html>
<script type="text/javascript" src="{{ URL::asset('public_js/jquery-1.8.3.min.js') }}"></script>
<script>
    $('.cxBtn').click(function(){
        var username = $('#searchname').val();
        window.location.href = '{{ url("/myadmin/customercx?username=") }}'+username;
    });
    $(function(){
        // 左侧边栏
        $('.j_sideNav > ul > li').eq(1).addClass('active').siblings('li').removeClass('active');
        // 右侧tab切换
        $('.L_cxTitle > span').click(function(){
            var index = $(this).index();
            $(this).addClass('bgColor').siblings('span').removeClass('bgColor');
            $('.L_cxCON > div').eq(index).css('display','block').siblings('div').css('display','none');
        })
        // 资料查询按钮
        $('.L_ZL > .L_search > .cxBtn').click(function(){
            var inputValue = $.trim($('.L_ZL .L_search > input').val());
            console.log(inputValue);
        })
    })
</script>
